<?php
/* 
 * class.userinfo.php
 * 我的家园-用户信息
 * @author samuel
 * @date 2009-05-24
 */
include_once 'class.myhomeBase.php';
class myhome_userinfo extends myhomeBase {

    function  __construct($core) {
        parent::__construct();
        //参数处理
        $this->step = $this->params['step'] ? strtolower(trim($core->params['step'])) : 'index';
	    $this->user_id = $this->params['uid'] ? (int)$this->params['uid'] : 1;
	    if(!$this->user_id){
		    $this->error = "用户ID不合法！";
		    $this->jumpError();
		    exit;
	    }

        $run = "run_" . $this->step;
        
        //header("Content-type: text/vnd.wap.wml");
        $this->$run();
    }

    function run_index(){
    	//WAP页面
	    //header("Content-type: text/vnd.wap.wml");
	    //TITLE
	    $page_title = "我的家园-信息动态";
	    $content = "";
	    $content .= "<img src='' alt='头像' /><br/>";
	    $content .= "<a href='".$_SERVER['PHP_SELF']."?uid=".$this->user_id."'>动态</a>｜<a href='".$_SERVER['PHP_SELF']."?act=userinfo&amp;uid=".$this->user_id."'>信息</a>｜<a href='".$_SERVER['PHP_SELF']."?act=userset&amp;uid=".$this->user_id."'>设置</a><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?act=msg&amp;uid=".$this->user_id."'>消息</a>｜<a href='".$_SERVER['PHP_SELF']."?act=favor&amp;uid=".$this->user_id."'>收藏</a>｜<a href='".$_SERVER['PHP_SELF']."?act=friend&amp;uid=".$this->user_id."'>好友</a><br/>";
	$content .= "<a href='".$_SERVER['PHP_SELF']."?act=pubSeller&amp;uid=".$this->user_id."'>发布商家</a>｜<a href='".$_SERVER['PHP_SELF']."?act=pubDiscount&amp;uid=".$this->user_id."'>发布优惠</a><br/>";
	

	    //用户信息
	    $user = $this->core->load('user::userBase')->getInfo(array('table'=>'fun_user', 'primary'=>'UserID'), $this->user_id);
	    $content .= "金钱:".$user['UserMoney']."<br/>";
	    $content .= "在线时间:".$user['UserOnlineTime']."<br/>";
	    $content .= "上次登录时间:".$user['UserLastLoginTime']."<br/>";
	    $content .= "房产<br/>";	
	
	
	    $content .= "<br/><br/>";
	    $content .= "<a href='' alt='建议帮助'>建议帮助</a>";



	    $this->core->tpl->assign('content', $content);
	    $this->core->tpl->assign('page_title', $page_title);
	    $this->core->tpl->display('comm.wml');
    
    }
}


?>
